package fun.easycode.jointblock.service.dto.data;

import fun.easycode.jointblock.manager.ArticleClientDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * @author xuzhe
 */
@Mapper
public interface ArticlePagingDtoAssembler {
    ArticlePagingDtoAssembler INSTANCE = Mappers.getMapper(ArticlePagingDtoAssembler.class);

    @Mapping(target = "college.id", source = "college")
    @Mapping(target = "user.userId", source = "userId")
    ArticlePagingDto to(ArticleClientDto dto);
}
